﻿<%@ Page Language="C#"  MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="ACM_Inbox_Calculate_Depreciate.aspx.cs" Inherits="KPIS.GERP.GAMS.APP.App_UI.Forms.ACM_Inbox_Calculate_Depreciate" %>

<%@ Register src="../UserControls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>รายการ</title>
    <link href="../CssClass.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../Scripts/DatePicker.js" type="text/jscript"></script>
</asp:Content>

<asp:Content ID="Body" runat="server" contentplaceholderid="ContentPlaceHolder1" >
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel2" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Panel2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel2" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>


  
     <div class="DivBody">
      <table align ="center">
                <tr>
                    
                   
                    <td  width="150px">
                       วันเดือนปีที่คิดคำนวณ :
                    </td>
                   
                       <td  width="300px">
                        <uc1:DatePicker ID="dpDateStart" runat="server" />
                       </td>
                     <td>
                        <asp:Button ID="cmdFilter" runat="server" Text="คำนวณค่าเสื่อมสะสม" OnClick="cmdFilter_Click" />
                    </td>
                </tr>
            </table>
         </div>
   
      <asp:Panel ID="Panel1" runat="server">
        <table align ="center">
           
             <tr><asp:Label ID="Label4" runat="server"  Font-Bold="true" text="ค่าเสื่อม" /></tr>
           
                
                <td>
                    <telerik:RadGrid ID="grdACMAccountAuto" runat="server" AutoGenerateColumns="false"
                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" 
                                    Width="800px" Height="300px" AllowPaging="true" AllowFilteringByColumn="false"
                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                    GroupingSettings-GroupContinuedFormatString=""
                                    GroupingSettings-GroupContinuesFormatString=""
                                    GroupingSettings-GroupSplitFormat=""
                                    OnNeedDataSource="grdACMVersion_NeedDataSource" 
                                     align ="center">
                        <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client" Width="100%"
                                        DataKeyNames="" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                 <telerik:GridBoundColumn DataField="asset_id" UniqueName="asset_id" Visible="false">
                                </telerik:GridBoundColumn>
                                <%--<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="25px">
                                                </telerik:GridClientSelectColumn>--%>
                                  <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="35px">
                                <HeaderStyle Width="35px" />
                                 </telerik:GridClientSelectColumn> 
                                <telerik:GridBoundColumn DataField="asset_code" 
                                                HeaderText="รหัสรายการ" 
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Width="170px"
                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                               
                                <%--HeaderStyle-Width="370px"--%>
                                <telerik:GridBoundColumn DataField="asset_name"
                                                HeaderText="ชื่อรายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="serial_number" 
                                                HeaderText="SerialNumber"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="asset_date" DataFormatString = "{0:D}"
                                                HeaderText="วันที่รายการ"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                               
                                 <telerik:GridBoundColumn DataField="price" DataFormatString = "{0:n2}"
                                                HeaderText="ราคาต่อหน่วย"
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                               <telerik:GridBoundColumn DataField="dp"
                                                HeaderText="ค่าเสื่อมสะสม"  
                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" HeaderStyle-Width="150px"
                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                

       </Columns>
                            <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                        </MasterTableView>
                        <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                        GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                        GroupSplitFormat="" />
                        <ClientSettings EnableRowHoverStyle="True">
                            <Selecting AllowRowSelect="true" />
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                        </ClientSettings>
                    </telerik:RadGrid>
                    
                </td>
                       </table>
          
            <div align="center" class="DivInfo">
                            <asp:LinkButton ID="btnSave" runat="server" CausesValidation="true" CssClass="LinkButton" onclick="btnSave_Click">บันทึกรายการคิดค่าเสื่อม
            </asp:LinkButton>
                        </div>  
             
    </asp:Panel>
      
 
 </asp:Content>

